/*
* 1videoConference -- An open source video conferencing platform.
*
* Copyright (C) 2007 - 2008, Adiance Technologies Pvt. Ltd.
*
* Hardik Sanghvi <hardik.sanghvi @adiance.com>
*
* See http://www.1videoconference.org for more information about
* the 1videoConference project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, forums and mailing lists
* for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
*/

using System;
using System.Collections.Generic;
using System.Text;
using System.ServiceModel;

namespace _videoConference.BAL
{
    [ServiceContract(CallbackContract = typeof(IsvcPodOps))]
    public interface IsvcPodOps
    {
        [OperationContract(IsOneWay = true)]
        void svcJoin(string uName,string meetingid);

        [OperationContract(IsOneWay = true)]
        void svcResetPod(double setLeft, double setTop, double setWidth, double setHeight, int PID,string meetingid);

        [OperationContract(IsOneWay = true)]
        void svcMaxPod(double setLeft, double setTop, double setWidth, double setHeight, int PID, bool MAXID,string meetingid);

        [OperationContract(IsOneWay = true)]
        void svcMinPod(int PID,string meetingid);

        [OperationContract(IsOneWay = true)]
        void svcSetPodLayout(string[] podproperty, string uname,string meetingid);
    }

    public interface IPodResizeChannel : IsvcPodOps, IClientChannel
    {
    }

    public class PodResizeClass : IsvcPodOps
    {
        public delegate void UserJoin(string uname, string meetingid);
        public delegate void ResetPod(double setLeft, double setTop, double setWidth, double setHeight, int PID, string meetingid);
        public delegate void MaxPod(double setLeft, double setTop, double setWidth, double setHeight, int PID, bool MAXID, string meetingid);
        public delegate void MinPod(int PID, string meetingid);
        public delegate void SetPodLayout(string[] podproperty, string uname, string meetingid);

        public event UserJoin ENewJoin;
        public event ResetPod EResetPod;
        public event MaxPod EMaxPod;
        public event MinPod EMinPod;
        public event SetPodLayout ESetPod;

        public void svcJoin(string uname, string meetingid)
        {
            ENewJoin(uname, meetingid);
        }

        public void svcResetPod(double setLeft, double setTop, double setWidth, double setHeight, int PID, string meetingid)
        {
            EResetPod(setLeft, setTop, setWidth, setHeight, PID, meetingid);
        }

        public void svcMaxPod(double setLeft, double setTop, double setWidth, double setHeight, int PID, bool MAXID, string meetingid)
        {
            EMaxPod(setLeft, setTop, setWidth, setHeight, PID, MAXID, meetingid);
        }

        public void svcMinPod(int PID, string meetingid)
        {
            EMinPod(PID, meetingid);
        }

        public void svcSetPodLayout(string[] podproperty, string uname, string meetingid)
        {
            ESetPod(podproperty, uname, meetingid);
        }

    }

}
